﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Odbc;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcApplicationDataHound.Models;

namespace MvcApplicationDataHound.Controllers
{
    public class TSD_HomeController : Controller
    {
        public ActionResult GroceryTracker()
        {
            return View();
        }

        public ActionResult SearchProducts()
        {
            ViewBag.Message = "Search Products";

            return View();
        }

        [HttpPost]
        public ActionResult SearchProducts(int UpcToSearch)
        {
            var productService = new ProductService();

            TSD_ProductData product = productService.GetProdcutData(UpcToSearch);
            
            return View("ReturnViews/SearchProducts", product);
        }

        public ActionResult MenuScheduler()
        {
            ViewBag.Message = "Menu Scheduler";

            return View();
        }
    }//EndClass
}
